import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'welcome',
            redirect:{
              name:'home'
            },
            // component: () => import('@/components/welcome'),
        }, {
            path: '/register',
            name: 'register',
            component: () => import('@/components/register'),
        }, {
            path: '/login',
            name: 'login',
            component: () => import('@/components/login'),
        }, {
            path: '/home',
            name: 'home',
            component: () => import('@/components/home'),
        }, {
            path: '/user',
            name: 'user',
            component: () => import('@/components/user'),
        }, {
            path: '/book/:id',
            name: 'book',
            component: () => import('@/components/book'),
        }, {
            path: '/book-add',
            name: 'book-add',
            component: () => import('@/components/book-add'),
        }, {
            path: '/book-my',
            name: 'book-my',
            component: () => import('@/components/book-my'),
        }, {
            path: '/abort',
            name: 'abort',
            component: () => import('@/components/abort'),
        }
    ]
})
